let app = getApp();
let openid;

Page({

  /**
   * 页面的初始数据
   */
  data: {
    
  },

  sub_tip:function(){

  },


  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    openid = app.userList.openid
    console.log(openid);
  },

 


  




  formSubmit:function(e){
     var content = e.detail.value.content;
     var jumpurl = app.jumpurl.url;
      if (content == ''){
        wx.showToast({
          title: '请填写反馈意见',
          icon:"none"
        })
        return false;
      }
      wx.request({
        url: jumpurl+'/my/fankui', 
        data: {
          openid:openid,
          content: content,
        
        },
        header: {
          "Content-Type": "application/json"
        },
        success:function(res){
          console.log("**************success***************");
          console.log(res);
          wx.showToast({
            title: '意见提交成功',
            duration:500
          })
          setTimeout(function(){
            wx.redirectTo({
              url: '../setting/setting',
            })
          },500)
         
        },
        error:function(err){
            console.log("************err***************");
            console.log(err);
        },

      })
  }
})